#include "util/logger/logger.h"
#include "log4cpp/PropertyConfigurator.hh"
#include "log4cpp/Priority.hh"

const char kLoggerConfPath[] = "./conf/log4cpp.properties";

/*
 * 程序初始化入口
 * */
void init() {
    // 初始化日志模块
    log4cpp_helper::Logger::getInstance()->init(kLoggerConfPath);
    // 测试各个级别的日志打印
    log_debug("%s msg", "debug");
    log_info("name:%s age:%d price:%.2f", "cat", 20, 1.324);
    log_warn("%s msg", "warning");
    log_error("%s msg", "error");
    // 测试带tag信息的日志打印
    log_error_t("my_error_tag", "%s msg", "error");
    return;
}

int main() {
    init();
    return 0;
}

